import PermissionMixin from "../../PermissionMixin"

export default {
  mixins: [PermissionMixin],
  created() {
    const { time } = this.$route.params
    if (time) {
      const _time = time.split("~").map(t => this.moment(t).format())
      this.timeDate = _time
    }
  },
  data() {
    const vm = this
    return {
      timeDate: [
        vm
          .moment()
          .add(-6, "days")
          .format(),
        vm.moment().format()
      ],
      options: {
        disabledDate(time) {
          return time.getTime() > Date.now()
        }
      }
    }
  }
}
